import java.util.Timer;
import java.util.TimerTask;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-09-28
 * Time: 17:39
 */

//定时器 系统内置的
public class Demo4 {
    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("这是一定时器!");
            }
        },3000);
        System.out.println("main");
    }
}
